/* 
Copyright 2011 Michael Mallon

This file is part of SQAT.

SQAT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SQAT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with SQAT.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef SQAT_REPRESENTATION_LADDEROPERATOR_H_
#define SQAT_REPRESENTATION_LADDEROPERATOR_H_

#include <string>
#include <complex>

using namespace std;

class LadderOperator
{
public:
	LadderOperator(void);
	LadderOperator(string site, string basis, bool creation, bool fermion);
	~LadderOperator(void);

	complex<double> commuteWith(LadderOperator A);
    complex<double> anticommuteWith(LadderOperator a);
	LadderOperator getConjugate(void);
	void conjugate(void);
	string getSite(void);
	void setSite(string s);
	string getBasis(void);
	void setBasis(string s);
	bool getCreation(void);
	void setCreation(bool x);
	bool getFermion(void);
	void setFermion(bool x);
	string toString();

	// methods to simplify usage
	bool isBoson(void);
	bool isFermion(void);
	bool isCreation(void);
	bool isAnnhiliation(void);

private:
	string site;
	string basis;
	bool creation;
	bool fermion;
};

#endif // SQAT_REPRESENTATION_LADDEROPERATOR_H_
